#define _CRT_SECURE_NO_WARNINGS 1
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<math.h>
#include<stdlib.h>
#include<stdio.h>
#include<unordered_map>
#include<queue>
#include<stack>
#include <functional>
#include <memory>
using namespace std;

class Solution {
public:
    int removeDuplicates(vector<int>& nums) {
        int left = 0, right = 0, n = 1;
        while (right < nums.size())
        {
            if (right != 0 && nums[right] == nums[right - 1]) n++;
            else n = 1;
            if (n <= 2) nums[left++] = nums[right];
            right++;
        }
        nums.resize(left);
        return left;
    }
};

int main()
{
    char arr1[] = {'a','b','c','d'};
    cout << arr1;
    return 0;
}